updated match method