testing search function for one function instead of several