todopubsub refactored using pubsub lib