rewrote a chunk of the event resolution stuff