use insert(.) on unordered map instead of access operator, potential resource leak