make simulate_transits more pythonic