updated higher order example