updated the engine class to remove objects