Code Review

Writing tests might help with testing particularly performance testing. :snake: :smiling_imp: 

Also, you may just need to limit the amount of time it traverses or the number of times before ending.