moved readGrid