finished predict.py