added rudimentary handling for roles