refactored result search into another class outside of main