publish and sample