beautify js before run
refactor