trans pattern match