working hashmap and select.