Changed the coloring pair parentheses funciton by using Thread class.