added logic to read file to hash