main and ignore sections - refactor