moved save() to save.js
moved save() to save.js