added piecewise_construct