altered few database functions to add functionality/more search inputs