add base of pubsub.js