some code from my blog.