Hello
you might want to take a lot at the demos by @wakecarter, complex randomisation and independent randomisation
Best wishes Jens