Original sentence: The Kingdom of Scotland was an independent state from its own unification in 843, until 1707, when the Treaty of Union was controversially passed by the Scottish Parliament, which led to the formation of the Kingdom of Great Britain
Edited sentence: The Kingdom of Scotland was an independent state from its own unification in 843, until 1707, when the Treaty of Union was agreed with the neighbouring Kingdom of England, which led to the formation of the Kingdom of Great Britain