more fixes to pattern matching example