private static Map<Character, Integer> addToMap(String text) {
        Map<Character, Integer> map = new HashMap<>();

        for (int i = 0; i < text.length(); i++) {
            char character = text.charAt(i);

            if (map.get(character) == null) {
                map.put(character, 0);
            }
            map.put(character, map.get(character) + 1);
        }

        return map;
    }