Added countdown example using setTimeout to avoid stack overflow