add pseudo code for population selection - sort-by is too slow