refinement: extract methods.