a two stage Bean Machine simulation function.