can now switch from running state to pause state by triggering P.