Update epor.py

Bring in andy's changes from epor4.py