made crucial fix to randomization scoping
fixed annoying inequality bug