used BigInteger to allow for massive factorials