pass the index to the forEach callback
update comments