replacing outerWidth by width