Source node update

It goes through every source node but the algorithm isn't stable :(