refactored generateNewGrid into a GridUtils class that both Grid and GridStore can use