added algorithm and ply selection