search working correctly