Completed higher order funtions.