Changed step function in example 2.9