make it work with new engine code