Added selection logic