changed CMap to use a goroutine for each func