extracted residual construction function from array construction function