update and delete by key