viginere as a function