added autosave, and updated custom next previous functionality