add time counter && improve