done at publish