changed filestream to work with C++ streams and cleaned up the nasty side effect (ifstream is not ='able)