Untested checkSequence function