added pause with escape key