added infrastructure for prediction