Modified the range_grades method