fixed on grid function