updated ipython notebook example