complete time counter
make code clean