Changing Random.rand to rand to make it work for 1.8