Changing monoalphabetic algorithm