search results working
move each function to seperate file