renamed smart.js