made mmpatterns tutorial use a random value