functions calling functions with functions as parameters