finished python wrapper