building out the JS sample