improve prep selection algorithm