another if-if tracing algorithm
Tweaks to new tracer