improve matching a function definition