refactors and add coloring