refactor the python interface