creating a random function for evaluation