refactoring of range-package (next round)