make sure engine is only created once