provide both branches of is_shared