add publish method (which is not done yet)