refactoring for sqlite