added matches functionality