Added random_range function