factorial test