occurrence seration is working though output needs some futzing.