int instead of boolean in calcFactors