refactoring
added search