refactored engine interface