Slightly more comfortable api for rand()