From there it runs northwards, passing the towns of Sonthofen, Immenstadt, and Kempten.left Between Lautrach near Memmingen and Ulm it forms the border between the two German States Bavaria and Baden-Württemberg for about 50 kilometers .