adding dynamic allocation to DMCL