predictor refactoring

internal function