Adding modifications as per conversations

Could "potentially" throw a StackOverflowError if they enter invalid data a large amount of times due to recursive call.