some js code changes