extract base.js from util.js