search function problem resolved