chapter 6 exercise 7 change function isRed
chapter 6 exercise 7 change function isRed