Assign grade functionality