added engine code changes