Restructure the extended Double-Array
Add testcases