Added factorial function variations