Updated func afterSave, now required two parameters + code formatting