homework help and piecewise function