use length of longest vector