update main.js to work with other application