refactored hash navigation, search logic