fixed e_matrix.rb