started to fix generating unconnected nodes