adding logic.js changes