added edit/update functionality