Made logic more logical (Math.random)