added functions and higher order functions