add turnstile logic