It works but I'm trying to figure out what it is doing.

Also need to remove the old incidence stuff.