slight improvements to gen