How Trolley Problems Work