change timeout and trime latest time