made changes to sample.js