hw5 finished

recursive and iterative