fixed a problem with new_graphs.cpp which was not doing the graph connections properly for the rectangular graphs (n!=m)