But the two countries agreed Friday night to design and construct an advanced rock and gravel filter system for a lake outlet North Dakota has already built on Devils Lake to alleviate flooding that has become increasingly troublesome to local farmers and villages in recent years .