identifying grade column and sng column in the same function