grid refacto