Implement random.