random generator tests
fixes shuffling bug