type signature for patterns