refinement: simplify code.