modified ipython notebook