The Soviet shipbuilding program kept yards busy constructing submarines based upon World War II German Kriegsmarine designs, which were launched with great frequency during the immediate post-war years. Afterwards, through a combination of indigenous research and technology obtained through espionage from Nazi Germany and the Western nations, the Soviets gradually improved their submarine designs, though they initially lagged the NATO countries by a decade or two.