upgraded sqlite
fix
refactor for tests