Updated js code - test 1