updated with matfile conversion