all residual integrals working correctly, doubel checked