updated controllers to for ng-repeat