dynamic chunk allocation