final running code