added Grid class with basic functionality