initial file based on fanout's pubsub.js