k is never initialized! what do you mean by text2(k)? t is never declared as well as initialized.
in your psudo code k implies a variable of type string and you use it as an index in text2(k)...
For best results, use the Firefox browser..