bug fixing
added pubsub