improvement of the random models generator