update ce_constructor to only do the memory allocation when absolutely necessary