modified recip.py