Added Pause feature which activates when the p key is pressed