added adapter pattern