moved grid to struct + impl