search working as fragment (need a lot of refactoring)