fixing bug ifn all edge weights are same
fix bug in map
fix /0 bug in map