js code modified