emit at the right time