polishing up the pub/sub implementation