Modify select method in wrapper.py