Optimization of residual stresses in the shot peening process