Add ipython notebook function