refactoring & grouping