Remove while loop

Just go for the straight recursive approach.
Merge pull request #1 from UdacityJeremy/patch-1

Remove while loop