Merged my version with yours, updated footprint.py