new update functionality for editing