improved addition of outerproducts and diracmatrices