Updated nearest thousandth code.