resolving patterns