another version of exercise 1.14