gridview refactor