using supertype map instead of hashmap