added higher order functions