test set generator function