Residual stresses in polymers and their effect on mechanical behavior