built Grid class constructors and getters and setters for private variables