update for read file function