reformatted code to be easier to read, still haven't figured out why need to get grades aren't working