cleaned up IPython notebook