Completed the random number generator routine to select contests on the contests index page