fixed test.js with array length