handle update/delete queries