added multiprocessing for quantization