More work on generator