Write your own rand function which returns random numbers in a given range(input) so that the numbers in the given range is equally likely to appear.