made modifiers optional and merged Alain's offset randomization