used mutableInt to adding the values in map