consolidates and refactor common role