refactor and grid remove