Simplified the generator