updated example
added hack to fix devision by zero in edge list