small improvements on generators