I did work it out. Have a look at this solution. It's not too difficult but I wouldn't be surprised there's an easier way.