added explanation comment for setLength behavior, setLength returns the validated and corrected length