updating sample.js