copied and pasted adapters.js