add rounding and scaling