add read file to vector function