added the possibility to pause the engine