created a search function, still needs some updates