colorize and refactor