change pubsub to return an instance
decent tests in place for now