Added getRandomElement function which will return a random entry from a list