exer 2.34 - tough - but got it after some experimentation