read data from txt file into hash table and return value for given key