first commit added adapt.js