precompute exits