integrate class.js and extends.js