some experimental iterative quantization code