saving mechanism almost done