fix #2

use angular.forEach in lieu of Array.forEach