Use generators instead of engine