HashMap replaced by TreeMap due to determinization