made edit and update work