wordSearch generate loop