Sorry, I got it wrong. This code works.