Correctly generating primary and secondary grades