add read file functions