data handling for ng-repeat