A simple random generation framework