Refactored method