added function too calculate cost of path
fix small mistake in adj matrix
draw graph by default