sets up listener for enter key
fixes merge conflict