Updated code for a new blog post.