refactor togglePrediction method