further updates to term.py