pattern matching start