express this as "idx < length" it's awkward to read with the varying variable on the right.