moved pubsub to main.js