general regressor implementation