modified the color method to make it single method.