implemented better selection strategy