Working code for the first two blog posts