updated js examples