implemention of a recursive factorial as an exercise.