# Error with .cardinality(algorithm='sae') for elliptic curve

Hello please i have a problem. I have already defined an elliptic curve over a ring `Zn`

and i want to compute its cardinality but i can not use `.cardinality(algorithm='sae')`

. Thank you.

Here is the programme that i want to implement.

```
def cardin(n,A,B)
Z = Zmod(n) # n is not a prime then Z is a ring
E = EllipticCurve(Z,(A,B))
return E.cardinality(algorithm='sae') "sae=Schoof Atkin"
TypeError: cardinality() got an unexpected keyword argument 'algorithm'
```