add autosave on input modification