added save function to remote.js file

added save function to remote.js file