updating ipython solution