Begin entity selection algorithm