adapter pattern implementation