extracted generator
added validator method
improved integration with sentesting