modifications leg.py