pause mode added (press [Esc]), code improvements