to find factorial of a num