Added support for a random selection of terms