moved save out of class