going back to orig rich_pred.py file