update before editing