write roles to an array directly