move codes around in history.cc, and NewFuzzer::selectWrite is half working