updated test.js to reflect recent changes