Added the forEach function