updating delete functionality and ID