fix bug in exercise 1-30
exercise 1-31