added prediction and predict training