added closing with escape
adjustments