finished tail.py