grades stat principal, datamapper relationships fixes