everything should be fully recursive now only an empty condition for processWord is left to be written