update js files + refactor
update js files + refactor