random generator takes to much cpu