replaced by factorial
improved logic
replaced
first commit