add dp pattern.