added python interface to the old version, so that now cpp and python
can be compared and cpp debugged more easily