Original sentence: Despite living on two sides of an international border since the treaties of Gulistan (1813) and Turkmenchay (1828), after which Iran losts its then northern territories to Russia, the Azeris form a single ethnic group.This included parts of the current Republic of Azerbaijan, however the formation of Azerbaijan Democratic Republic in 1918 finalized the borders with Russia and present-day  Iran.according to the treaties of Gulistan in 1813 and Turkmenchay in 1828
Edited sentence: Despite living on two sides of an international border since the treaties of Gulistan (1813) and Turkmenchay (1828), after which Iran losts its northern territories to Russia, the Azeris form a single ethnic group.The treaties of Gulistan in 1813 and Turkmenchay in 1828 finalized the border between Russia and Persia (today known as Iran).This included parts of the current Republic of Azerbaijan