Updated pubsub to use mongoose