Add relay logic