Updated to Huy's JS Demo