added a way to save all the attributes in a class to a classobj