update adapter.py