before prediction