Completed ZeroesConnectedToOnes - for 2D only