add test for function forEach
clean up spec
merge