added inheritance to adapter