refactoring to using roles