Update lib/adapter.js file