factorial function using recursive code