update for new pattern handling