adapter.cpp