adding role logic