added first draft of c++ code (make_random is just for populating the random pool)