search function tested