first attempt at top_tep.py