Working on problem 3.18