Modified revtable.py