minor changes to coloring code