refactoring grid, chart.util