up to ex6.4 - functional random numbers