updated width calculator.