More logic in pir state picking