some changes to the forEach and #2