Tested search function