same change for saving, and switched over to using getattr