added several methods to the Grid class