added logic to vigenere