pattern matching is sometimes useful