Addition of pub-sub pattern. Needs a bit more explanation added.