search model refactored