[TASK] Refactored into smaller methods