listen for enter key to submit
added caching for query input