factorial
improve factorial