added functionality for the button/enter key