wrap a function to accept only two arguments