grid & refactoring