add variable chunk size to avoid extra looping