publish and subscribe working properly with users