New approach (in file carres.py), which works very well!