refactor clearing test database