handle grouped adds and deletes