checking and building a balanced graph is now working