Code from my blog of my bad code.