Refactored shortening into a method