Added lamba expression to sum the factors (for Java 8 only)