added better color looping