adding deterministic selection