This line is extra, probably left over from debugging?  Anyhow, you're calling getWords twice.