Adding test for the square latice

Changed the node distribuition function from networks
Now it retruns the distribuition and is possible to test if it is right