Code to replicate illustrative example found in paper