update for press enter exit logic