workiing with angular-resource