add convertor and adjencymatrix method and to_undirected method