update style
improve js code
improve readability