modify to search only on submit