#34 fixed and search refactoring