pattern adapter