Added edit/update functionality