added options to minimalPrimes and decompose