now uses ng-resource