demo of code in an IPython notebook