changed get_roles method to support direct access