moved engine initialization to a separate file