implemented update functionality in backend and frontend