Automatic integral reduction for higher order perturbative calculations