Determination of length and width