add coloring algorithm