after pi run
factor out detection to shared assembly