started engine refactoring