adapter.js adapted