changed to use ng-repeat