add plan debugging code
FIX coloring