Add missing engine code