update chunk size logic