higher order function test