cleaned up GridUtils