update and test main.js