formatted some code in the engine