save with js almost done