changed matrices to std::valarray
added output to a file
adding feature scaling
optimized cycle
making it work