grid simple refactoring