duplicates entries are not allowed in hashmap
linked list program corrected