partial implementation of gridfile class and grid classes