functions for testing in generator, work on tests