make generation a bit more efficient