added registration part of publisher/subscriber pattern
Merge