extract grade info and fix stuff