measure, minor fixes. 93% correctness