let basic_role_instances = ref ([]: (int * role_instance) list)