connection layout wrong due to for loop not full length