added pause menu logic