refactor for role based structure