finishe the wrapper to python