group services by grade before considering a merge