check_range fixed, touch tested, averages in contexts