working on higher order functions