length check is unecessary in the general case