working on grade code