improve matching api