methods on $resource