The undertaking shall contain provisions preserving freedom of transit and visit for all residents or citizens of both States and of the City of Jerusalem, subject to security considerations; provided that each State and the City shall control residence within its borders.