started ParsePattern implementation