adding basic regression cpp