implement shuffling
make my linter happy
refactor test logic into a separate function