Got search working properly