testing generation and cleaning up