added forEach function