updated saving scripts