By the 17th century, an estimated 30,000 to 40,000 Scots lived in the Polish–Lithuanian Commonwealth. Many came from Dundee and Aberdeen. Scots could be found in Polish towns on the banks of the Vistula as far south as Kraków. Settlers from Aberdeenshire were mainly Episcopalians or Catholics, but there were also large numbers of Calvinists. As well as Scottish traders, there were also many Scottish soldiers in Poland. In 1656, a number of Scottish highlanders seeking opportunities abroad, emigrated to the Polish–Lithuanian Commonwealth to enlist in the Swedish Army under Charles X Gustav in his war against it. James Murray created the Polish navy and participated in the Battle of Oliwa. A series of four Polish novels include him as "Captain Mora" or "Flying Scotsman". The writer Jerzy Bogdan Rychliński was supported by navy historian Jerzy Pertek.