Refactored a method