#publish method and tests