implemented pub/sub examples