add test for search function