update replicate functionality to remove sub-ids