got the color change function to work