Solution to ex1-7