added some js code