make _counter work correctly, add word history table