update refresh code in NGram2, 3, 4