Flexible additive risk models using piecewise constant hazard functions