modified to change color each second