format numbers before inserting into hashmap