Modify wrapper.py to use two functions.