add functionality for ipython notebooks