changed pubsub to use router