surgery didn't work, random pill did

So this is super embarrassing but there could be someone dealing with this that was as desperate as I was. 
I had a wart on the bottom of my foot. I tried freezing it off at home, ACV, duct tape. Every single at home treatment you can find on the internet, painful or not
I did it. It made me feel gross, major killer of self esteem. What happened? It got bigger. Then more started popping up. I had them all over my foot.  Great right? Big huge nasty warts all over my foot. 
It was incredibly embarrassing especially as a teen girl in the summer time. I felt like I had to hide my foot. I actually still hide my foot out of habit even though the warts are gone. Besides the point. 
So finally I went to the doctor and told him everything including how it made me feel and he didn't even bother trying to freeze them and he sent me to have all of them surgically removed. The surgeon, as he was putting me under counted the warts. He got to 17 and I was out. That happened. I didn't feel a thing and my foot never even hurt even though I had deep holes in my foot. I thought I was good to go. 
Nope. They came back. All of them. I went back to the doctor and he said "okay. I rarely do this but I'm doing it. I'm prescribing you a pill that's used to treat stomach ulcers. But it's going to activate your immune system and get rid of the warts" 
The medication is called Tagamet. I was on it for a week or 2 and they started to go away.  I haven't had warts in 4 years now and I cannot tell you the immense relief I felt when I looked at my foot and it was perfect.  So if you happen to be that person who is dealing with awful warts like I was, you know something now. 
Edit: yes my Pap smears came back normal and I have annual Pap smears done. That's a different strand of HPV. 
At the time I didn't know that warts were HPV (I was a kid) and when my doctor explained how the pill would work he mentioned HPV and I asked him how I had an STD as a virgin and he laughed at me and told me it was a different strand and that common warts are easily spread.