updated button functionality to work on Enter