Logic to randomise the categories