Added a method to return words in grid