#92 ranges refactor