Adding role, and some collapsed logic