replaced loadtxt by genfromtxt