added switch statement for grade problem