added some more specs
refactored the generator specs to check emptiness and validity as default