transformation based on hashmap