Updated code to reflect changes in blog