modify main and add some convenience to WordGrid