change directive pattern to new style