added logic for the "D" letter grade