refinements + tests