thanks, that's perfect.
The way in which i found (p-1)(q-1) is to take a set of sequences of powers of x mod N for x=1,2,...,N-1 and work out their periods, each period turns out to be a divisor of (p-1)(q-1), if a large enough number of divisors is taken, then the value of (p-1)(q-1) can be...