Refactored the retrieve method into another class