refactor, group by dependent rolls