Formating evolve-grid function