amended ParseGroup setLength function to validate inputs, and reset rehearsals if the length changes