calling search function