Hashmap for resolving indexing issue