fixing search and refactoring validation types