pattern match with sets