Finalizing pattern matching