attempt to have functional predictor.py code