finished the subscriber part using node-persist