Refactoring - Created a method