But by the beginning of 1943 the Allies had gained the upper hand over the U-boats, thanks to an improved technique of using long-range aircraft and aircraft carriers and, above all, of equipping their surface vessels with radar which spotted the enemy submarines before the latter could sight them.