insert db adapter via function argument
update tests by passing adapter as argument