extracting class out & using randomized test