Simply montecarlo_one_packet_loop a bit through the use of function pointers