OP-1302 simplify the code adding some pattern "tables"