adapter.py