search icon added and code refactoring