added quantization step