pulled out prediction function, and get pursue working and tested