fixes #93
closes #90 with a shared_ptr approach to python objects sent to c++