simplify enclosure length check.