switched to zmq library, major recoding