What were the decisive factors that meant the North Vietnamese won the Vietnam war?

In relation to U.S. History please consider this ~ we did not lose the war, we pulled out due various circumstances. The French had gone in with the intention to stop the spread of Communism, and we sent advisors until the French requested military aide. We did not declare war until 1965, our advisors were sent in 1950. There are some hints that Kennedy was going to pull all U.S. involvement before he was assassinated in '63.When you consider that we signed a treaty/agreement freeing nearly 700 Prisoners Of War (POW) from North Vietnamm, but did not declare being defeated, not to mention that South Vietnam did not turn to Communism like Laos and Cambodia did - there were some victories in our involvement in Vietnam.