Custom implementation of hashmap data structure