fixed test.js to include new implementation