I think we should probably use http://docs.scipy.org/doc/numpy/reference/generated/numpy.random.randint.html instead of this function