Submit and search button functions implemented