replace HashMap with LinkedHashMap to keep order
added test