preparation before publishing