Refactored (completed)