chunking is done in a (potentially more flexible) separate script