refactoring
test`s uses in memory db