Refactored (again)