added adapt.js