modified challenge.js to debug code