Changed width calculation method