script code updated