save locally and ajax saving implemented