[rewrite] main.js with Vector.js