added code example of adapter pattern