refactor PubSub_Spec