functions to read file added