time update and string matching counter