attempt pattern matching