closure on NextTick