added pub-sub for component communication