refinement: extract input methods.