advanced wamp impl. Yet not ready to be NPM published