Refactor (to clarify the flow)