made some more changes - the test is still puking at the end due to a deadlock that I don't understand and the algorithm is diverging like crazy