exit at the right time