Implement random()