publish method