updated  javascript