updated and started to add python interface.