updated base.js