added countdown function