adding a JS iterator