Code for the SitePoint article - part 2