added init js code