pass a function handle as a input argument