generalize countdown thingy into a general callback