save changes before nn