implemented a functional parseCipher method and a token-string-split method