finalizing code for blogpost