replace cscmatrix with hashmap in globalcounter.scala