publication demo code