added ability to submit input with "enter"