added a handler for the enter