modify selection logic