Client side: update edit function