Updated logic for countdown and update html