reverse method I was mad about.

I will try and make this as short as possible. I was with my ex fiancé for about 4 years, for a straight year I wasn't on birth control and we were trying for a baby and no luck. Well I thought it was just me because he has a kid already so I know he's fertile. Well After a while we split then thrrr months later I wanted to sleep with a guy so I got on birth control and second time having sex with him..... I'm pregnant. I ended up having a miscarriage three months along. When it was happening I couldn't understand why I got pregnant when I chose to prevent it.