add timer for both end