Added the searchFunction, still a bit bugged though..
tried to fix the Search functionality