added generator tests and an optional slots arg for easier testing, might take it out