edit for ipython notebooks