Better performance on factorial method.