MDNv2 cloned from jsocol/kitsune