updated promises JS example