piecewise functions overview with example 1