Well Done! I have to say it took me a while to sort it out, using the old brain cells :D got there in the end though.
One of those things that when you don't know looks insurmountable and then when you do know, you wonder what all the fuss was about!!