fixed factorial
add tests to factorial
clean up reverse