refactoring from grid/model to grid