added checks to make sure user fills in all search fields before submitting