solved exer 2.20 but i don't like it.
slightly better answer and the one from Bill the Lizard - still feel like i missed something