added linear predictor function