add adapter.js and integrate it to the code