Update to code on Mary's Post

A (hopefully) final update to the code so my post shows up.