Implemented pattern matching of sections