exer 2.24
exer 2.25 - a bit of trial and error