split carrier detection into detect.py