minor tweaks
isolated generate_chunk