save and update to ajax