fixes #12 (port pubsub from sandbox to app)