remove ifstream and cerr since they are unecessary