fixed the keyToSequence / valueToSequence methods