Wasn't that the idea of the code you posted here?