added pub-sub implementation with basic example.