add matcrs read file function