refactored result method