added creating adjacency mat