added method to determine result of a match