minor changes to higher order functions