New algorithm for phix