Added countdown timer logic and a setInterval method to paint it on screen