width calculation enhancements