length-independent refinement